import Vue from 'vue'
import Router from 'vue-router'

//首页
const Home = r => require.ensure([], () => r(require('../views/home/home.vue')), 'home')
    //抽奖
const LuckDraw = r => require.ensure([], () => r(require('../views/home/child/luckDraw.vue')), 'luckDraw')
    //体验金
const ExperiencesGold = r => require.ensure([], () => r(require('../views/home/child/experienceGold.vue')), 'experienceGold')
    //产品
const Product = r => require.ensure([], () => r(require('../views/product/product.vue')), 'product')
    //分类
const C2C = r => require.ensure([], () => r(require('../views/c2c/c2c.vue')), 'c2c')
    //我的 
const Mine = r => require.ensure([], () => r(require('../views/mine/mine.vue')), 'mine')
    //分币计划详情页
const PlanDetails = r => require.ensure([], () => r(require('../views/product/child/planDetails.vue')), 'planDetails')
    //分币计划 安全问题
const security = r => require.ensure([], () => r(require('../views/product/child/security.vue')), 'security')
    // 分币计划常见问题
const common = r => require.ensure([], () => r(require('../views/product/child/common.vue')), 'common')
    // 分币计划购买
const buy = r => require.ensure([], () => r(require('../views/product/child/buy.vue')), 'buy')
    //分币购买成功
const purchase = r => require.ensure([], () => r(require('../views/product/child/purchase.vue')), 'purchase')
    //用户名登录
const Login = r => require.ensure([], () => r(require('../views/login/login.vue')), 'login')
    //手机号登录
const PhoneLogin = r => require.ensure([], () => r(require('../views/login/phoneLogin.vue')), 'phoneLogin')
    //注册
const Register = r => require.ensure([], () => r(require('../views/register/register.vue')), 'register')
    //忘记密码
const ForgetPass = r => require.ensure([], () => r(require('../views/forgetPass/forgetPass.vue')), 'forgetPass')
    //用户中心
const UserCenter = r => require.ensure([], () => r(require('../views/usercenter/userCenter.vue')), 'userCenter')
    //活期计划
const CurrentPlan = r => require.ensure([], () => r(require('../views/currentPlan/currentPlan.vue')), 'currentPlan')
    //历史年化利率
const HistroyYearRate = r => require.ensure([], () => r(require('../views/currentPlan/child/historyYearRate.vue')), 'historyYearRate')
    //转出
const TurnOut = r => require.ensure([], () => r(require('../views/currentPlan/child/turnOut.vue')), 'turnOut')
    //转入
const ShiftTo = r => require.ensure([], () => r(require('../views/currentPlan/child/shiftTo.vue')), 'shiftTo')
    //充值
const Recharge = r => require.ensure([], () => r(require('../views/currentPlan/child/recharge.vue')), 'recharge')
const RechargeTo = r => require.ensure([], () => r(require('../views/currentPlan/child/rechargeTo.vue')), 'rechargeTo')
    //定期计划
const RegularPlan = r => require.ensure([], () => r(require('../views/regularPlan/regularPlan.vue')), 'regularPlan')
    //资金记录
const CapitalRecord = r => require.ensure([], () => r(require('../views/capitalRecord/capitalRecord.vue')), 'capitalRecord')
    //邀友返利
const InviteRebate = r => require.ensure([], () => r(require('../views/inviteRebate/inviteRebate.vue')), 'inviteRebate')
    // 历史收益（BTC）

//关于我们
const AboutUs = r => require.ensure([], () => r(require('../views/aboutUs/aboutus.vue')), 'aboutUs')
    //常见问题
const CommonProblem = r => require.ensure([], () => r(require('../views/aboutUs/commonProblem/commonProblem.vue')), 'commonProblem')
    //联系我们
const ContactUs = r => require.ensure([], () => r(require('../views/aboutUs/contactUs/contactUs.vue')), 'contactUs')


//消息中心
const News = r => require.ensure([], () => r(require('../views/news/news.vue')), 'news')
    //消息详情
const NewDetails = r => require.ensure([], () => r(require('../views/news/child/newDetails.vue')), 'newDetails')
    //身份认证
const IdentityAuthentication = r => require.ensure([], () => r(require('../views/usercenter/identityAuthentication/identityAuthentication.vue')), 'identityAuthentication')
    //密码设置
const PasswordSetting = r => require.ensure([], () => r(require('../views/usercenter/passwordsetting/passwordSetting.vue')), 'passwordSetting')
    //修改登录密码
const ModifyLoginPassword = r => require.ensure([], () => r(require('../views/usercenter/passwordsetting/modifyLoginPassword.vue')), 'modifyLoginPassword')
    //交易密码
const buypassword = r => require.ensure([], () => r(require('../views/usercenter/passwordsetting/buypassword.vue')), 'buypassword')
    //修改交易密码
const ModifyDealPassword = r => require.ensure([], () => r(require('../views/usercenter/passwordsetting/modifyDealPassword.vue')), 'modifyDealPassword')
    //找回交易密码
const RetrieveDealPassword = r => require.ensure([], () => r(require('../views/usercenter/passwordsetting/retrieveDealPassword.vue')), 'retrieveDealPassword')
    //账户设置
const AccountSetting = r => require.ensure([], () => r(require('../views/usercenter/accountsetting/accountSetting.vue')), 'accountSetting')
    //银行卡支付
const BankPay = r => require.ensure([], () => r(require('../views/usercenter/paymethod/bankPay.vue')), 'bankPay')
    //支付宝支付
const AliPay = r => require.ensure([], () => r(require('../views/usercenter/paymethod/aliPay.vue')), 'aliPay')
    //微信支付
const WechatPay = r => require.ensure([], () => r(require('../views/usercenter/paymethod/wechatPay.vue')), 'wechatPay')
    // 历史收益
    //const history = r => require.ensure([], () => r(require('../views/currentPlan/history.vue')), 'history')



//putGold
const PutGold = r => require.ensure([], () => r(require('../views/putGold/putGold.vue')), 'putGold')
    // deal
const Deal = r => require.ensure([], () => r(require('../views/mine/deal/deal.vue')), 'deal')
    // already
const Already = r => require.ensure([], () => r(require('../views/usercenter/already/already.vue')), 'already')
    //提币
const GetMoney = r => require.ensure([], () => r(require('../views/getMoney/getMoney.vue')), 'getMoney')
    //提币记录
const GetRecord = r => require.ensure([], () => r(require('../views/getMoney/getRecord.vue')), 'getRecord')


// location
// 提币详情
const location = r => require.ensure([], () => r(require('../views/getMoney/location.vue')), 'location')
    // 充币
const money = r => require.ensure([], () => r(require('../views/currentPlan/child/money.vue')), 'money')


const main = r => require.ensure([], () => r(require('../views/main/main.vue')), 'main')
    //扫描
const scan = r => require.ensure([], () => r(require('../views/getMoney/scan.vue')), 'scan')
Vue.use(Router)






export default new Router({
    routes: [{
            path: '/', //首页
            name: 'home',
            redirect: '/Home'
        }, {
            path: '/Home', //首页
            name: 'home',
            component: Home,
            meta: {
                title: "首页",
                navbarShow: true, //true显示,false隐藏
                requireAuth: false
            },
        },
        {
            path: '/scan', //扫描
            name: 'scan',
            component: scan,
            meta: {
                title: "扫描",
                navbarShow: false //true显示,false隐藏
            },
        },
        {
            path: '/already', //首页
            name: 'already',
            component: Already,
            meta: {
                title: "",
                navbarShow: false //true显示,false隐藏
            },
        },
        {
            path: '/putGold', //入金
            name: 'putGold',
            component: PutGold,
            meta: {
                title: "入金",
                navbarShow: true, //true显示,false隐藏
                requireAuth: true
            },
        },
        {
            path: '/deal', //首页
            name: 'deal',
            component: Deal,
            meta: {
                title: "",
                navbarShow: false //true显示,false隐藏
            },
        },
        {
            path: '/luckDraw', //抽奖
            name: 'luckDraw',
            component: LuckDraw,
            meta: {
                title: "抽奖"
            }
        }, {
            path: '/experiencesGold', //体验金
            name: 'experiencesGold',
            component: ExperiencesGold,
            meta: {
                title: "体验金"
            }
        }, {
            path: '/product', //产品
            name: 'product',
            component: Product,
            meta: {
                title: "产品",
                navbarShow: true
            }
        }, {
            path: '/c2c', //C2C
            name: 'c2c',
            component: C2C,
            meta: {
                title: "C2C",
                navbarShow: true
            }
        }, {
            path: '/mine', //我的
            name: 'mine',
            component: Mine,
            meta: {
                title: "我的",
                navbarShow: true
            }
        }, {
            path: '/planDetails', //分币计划详情页
            name: 'planDetails',
            component: PlanDetails,
            meta: {
                title: "分币计划详情页",
                requireAuth: true
            }
        }, {
            path: '/security', //分币计划详情页
            name: 'security',
            component: security,
            meta: {
                title: "分币计划安全问题"
            }
        }, {
            path: '/buy', //分币计划购买
            name: 'buy',
            component: buy,
            meta: {
                title: "分币计划购买"
            }
        }, {
            path: '/common', //分币计划常见问题
            name: 'common',
            component: common,
            meta: {
                title: "分币计划常见问题"
            }
        }, {
            path: '/purchase', //分币购买成功
            name: 'purchase',
            component: purchase,
            meta: {
                title: "分币计划常见问题"
            }
        }, {
            path: '/login', //用户名登录
            name: 'login',
            component: Login,
            meta: {
                title: "登录",
                navbarShow: false, // ture显示底部导航,false不显示底部导航
                requireAuth: false // ture显示页面需要登录才可以进入,false页面不需要登录就可以进入
            }
        }, {
            path: '/phoneLogin', //手机号登录
            name: 'phoneLogin',
            component: PhoneLogin,
            meta: {
                title: "登录",
                navbarShow: false, // ture显示底部导航,false不显示底部导航
                requireAuth: false // ture显示页面需要登录才可以进入,false页面不需要登录就可以进入
            }
        }, {
            path: '/register', //注册
            name: 'register',
            component: Register,
            meta: {
                title: "注册",
                navbarShow: false
            }
        }, {
            path: '/buypassword', //交易密码
            name: 'buypassword',
            component: buypassword,
            meta: {
                title: "交易密码",
                navbarShow: false
            }
        },
        {
            path: "/userCenter", //用户中心
            name: "userCenter",
            component: UserCenter,
            meta: {
                title: "用户中心",
                navbarShow: false,
                requireAuth: true
            }
        }, {
            path: "/currentPlan", //活期计划
            name: "currentPlan",
            component: CurrentPlan,
            meta: {
                title: "活期计划",
                navbarShow: false,
                requireAuth: true
            }
        }, {
            path: "/histroyYearRate", //历史年化利率
            name: "histroyYearRate",
            component: HistroyYearRate,
            meta: {
                title: "历史年化利率",
                navbarShow: false,
                requireAuth: true
            }
        }, {
            path: "/turnOut", //转出
            name: "turnOut",
            component: TurnOut,
            meta: {
                title: "转出",
                navbarShow: false,
                requireAuth: true
            }
        }, {
            path: "/shiftTo", //转入
            name: "shiftTo",
            component: ShiftTo,
            meta: {
                title: "转入",
                navbarShow: false,
                requireAuth: true
            }
        }, {
            path: "/recharge", //充值
            name: "recharge",
            component: Recharge,
            meta: {
                title: "充值",
                navbarShow: false,
                requireAuth: true
            }
        },
        {
            path: "/rechargeTo", //充值rechargeTo
            name: "rechargeTo",
            component: RechargeTo,
            meta: {
                title: "充",
                navbarShow: false,
                requireAuth: true
            }
        }, {
            path: "/regularPlan", //定期计划
            name: "regularPlan",
            component: RegularPlan,
            meta: {
                title: "定期计划",
                navbarShow: false,
                requireAuth: true
            }
        }, {
            path: "/capitalRecord", //资金记录
            name: "capitalRecord",
            component: CapitalRecord,
            meta: {
                title: "资金记录",
                navbarShow: false,
                requireAuth: true
            }
        }, {
            path: "/inviteRebate", //邀友返利
            name: "inviteRebate",
            component: InviteRebate,
            meta: {
                title: "邀友返利",
                navbarShow: false,
                requireAuth: true
            }
        }, {
            path: "/aboutus", //关于我们
            name: "aboutus",
            component: AboutUs,
            meta: {
                title: "关于我们",
                navbarShow: false,
            }
        }, {
            path: "/commonProblem", //常见问题
            name: "commonProblem",
            component: CommonProblem,
            meta: {
                title: "常见问题",
                navbarShow: false,
            }
        }, {
            path: "/contactUs", //联系我们
            name: "contactUs",
            component: ContactUs,
            meta: {
                title: "常见问题",
                navbarShow: false,
            }
        }, {
            path: "/identityAuthentication", //身份认证
            name: "identityAuthentication",
            component: IdentityAuthentication,
            meta: {
                title: "身份认证",
                navbarShow: false,
                requireAuth: true
            }
        }, {
            path: "/passwordSetting", //密码设置
            name: "passwordSetting",
            component: PasswordSetting,
            meta: {
                title: "密码设置",
                navbarShow: false,
                requireAuth: true
            }
        }, {
            path: "/modifyLoginPassword", //修改登录密码
            name: "modifyLoginPassword",
            component: ModifyLoginPassword,
            meta: {
                title: "修改登录密码",
                navbarShow: false,
                requireAuth: true
            }
        }, {
            path: "/modifyDealPassword", //修改交易密码
            name: "modifyDealPassword",
            component: ModifyDealPassword,
            meta: {
                title: "修改交易密码",
                navbarShow: false,
                requireAuth: true
            }
        }, {
            path: "/retrieveDealPassword", //找回交易密码
            name: "retrieveDealPassword",
            component: RetrieveDealPassword,
            meta: {
                title: "密码设置",
                navbarShow: false,
                requireAuth: true
            }
        }, {
            path: "/accountSetting", //账户设置
            name: "accountSetting",
            component: AccountSetting,
            meta: {
                title: "账户设置",
                navbarShow: false,
                requireAuth: true
            }
        }, {
            path: "/bankPay", //银行卡支付
            name: "bankPay",
            component: BankPay,
            meta: {
                title: "银行卡支付",
                navbarShow: false,
                requireAuth: true
            }
        }, {
            path: "/aliPay", //支付宝支付
            name: "aliPay",
            component: AliPay,
            meta: {
                title: "支付宝支付",
                navbarShow: false,
                requireAuth: true
            }
        }, {
            path: "/wechatPay", //微信支付
            name: "wechatPay",
            component: WechatPay,
            meta: {
                title: "微信支付",
                navbarShow: false,
                requireAuth: true
            }
        }, {
            path: "/news", //消息中心
            name: "news",
            component: News,
            meta: {
                title: "消息中心",
                navbarShow: false,
                requireAuth: true
            }
        }, {
            path: "/newDetails", //消息详情
            name: "newDetails",
            component: NewDetails,
            meta: {
                title: "消息详情",
                navbarShow: false,
                requireAuth: true
            }
        },
        {
            path: '/forgetPass', //忘记密码
            name: 'forgetPass',
            component: ForgetPass,
            meta: {
                title: "忘记密码",
                requireAuth: false
            }
        },
        {
            path: '/getMoney', //提币
            name: 'getMoney',
            component: GetMoney,
            meta: {
                title: "币",
                requireAuth: true
            }
        },
        {
            path: '/getRecord', //提币记录
            name: 'getRecord',
            component: GetRecord,
            meta: {
                title: "提币记录",
                requireAuth: true
            }
        },
        {
            path: '/money', //充币记录
            name: 'money',
            component: money,
            meta: {
                title: "提币记录",
                requireAuth: true
            }
        },

        {
            path: "/location", //提币详情
            name: "location",
            component: location,
            meta: {
                title: "提币详情",
                navbarShow: false,
                requireAuth: true
            }
        },

        {
            path: "/main", //提币详情
            name: "main",
            component: main,
            meta: {
                title: "主页面",
                navbarShow: false,
                requireAuth: true
            }
        },


    ],
    mode: 'hash'
})